﻿#ifndef LARGEFILEUPLOADDAO_H
#define LARGEFILEUPLOADDAO_H
#include "largefileupload.h"

#include <QSqlDatabase>

class LargeFileUploadDao
{
public:
    LargeFileUploadDao();
    ~LargeFileUploadDao();

public:
    void openDataBase();
    void closeDataBase();
    QSqlDatabase getDataBase() const;

    QString getDbPath() const;
    void setDbPath(const QString &value);

public:
    bool selectLargeFileUploadByMd5(LargeFileUpload &largeFileUpload,QString &md5);
    bool saveLargeFileUpload(LargeFileUpload &largeFileUpload);
    bool deleteLargeFileUploadById(uint64_t &id);

private:
    QSqlDatabase dataBase;
    QString dbPath;
    QString tableName;
};

#endif // LARGEFILEUPLOADDAO_H
